<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validators/information.js"></script>

 <div class="f_l margin1" style="width:100%">
    <div style="height:24px;color:red" align="center" id="errorInfo">${failInfo }</div>
   	<div style="height:24px;color:red;font-weight:bold" align="left">新增信息</div>
    <s:form enctype="multipart/form-data" id="submitForm" action="information!save" method="post" theme="simple">
   	<table>
   		<tbody>
   			<tr>
   				<td width="10%"><s:text name="标题"/>：</td>
   				<td><input type="text" name="information.title" /></td>
   			</tr>
   			<tr>
   				<td><s:text name="信息类别"/>：</td>
   				<td>
   					<input type="hidden" id="information.typeName" name="information.typeName" />
   					<select onchange="javascript:commonSelect(this,'information.typeName');" name="information.typeId" id="information.typeId">
   						<option value="">-- 请选择 --</option>
   						<s:iterator var="infoType" value="basicInfos">
			                <option value="${infoType.id}">${infoType.name}</option>
		                </s:iterator>
		            </select>
   				</td>
   			</tr>
   			<tr>
   				<td>
   					 <s:text name="正文"/>：
   				</td>
   				<td>
   					<textarea rows="8" cols="25" name="information.content"></textarea>
   				</td>
   			</tr>
   			<tr>
   				<td>
   					 <s:text name="图片"/>：
   				</td>
   				<td>
   					<a href="javascript:void(0)" onclick="addAttachment(this,'information')" style="background:#03fbfe;text-indent:2px;display:block;border:1px solid green;width:50px;height:14px;line-height:14px;">添加图片</a>
   				</td>
   			</tr>
   			<tr> 
   				<td align="left">
   					<input type="submit" value="确认" onclick="return doValidate(event);" />
  				</td>
   				<td align="left">
   					<input type="button" value="取消" onclick="window.location.href='information!list'"/>
   				</td>
   			 </tr>
   		</tbody>
   	</table>
    </s:form>
  </div>
  